<?php /* Smarty version 2.6.20, created on 2011-10-25 17:38:37
         compiled from _core/_include/module/_mvc/control/tablerows/handletablerowcontract.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', '_core/_include/module/_mvc/control/tablerows/handletablerowcontract.tpl', 13, false),)), $this); ?>
function HandleTableRowContract(gui, item, options) {
  this._gui = gui;
  this._item = item;
  this._options = options;
  this._operator = (options && options.operator) ? options.operator : null;
  this._createElements();
};

HandleTableRowContract.prototype._createElements = function() {
  var a, img, _self = this;
  
  a = document.createElement('a');
  if (this._operator.type == '<?php echo ((is_array($_tmp=@USER_TYPE_MANAGER_ASSISTANT)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
') {
    a.href = '?p=pageasst&t=pagebackendcontract&m=' + JSON.stringify({ a: 5, b: 8 }) + '&opts=' + JSON.stringify({ id: this._item.id });
  } else if (this._operator.type == '<?php echo ((is_array($_tmp=@USER_TYPE_MANAGER)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
') {
    a.href = '?p=pagemanager&t=pagebackendcontract&m=' + JSON.stringify({ a: 5, b: 8 }) + '&opts=' + JSON.stringify({ id: this._item.id });
  } else {
    a.href = '?p=pageadmin&t=pagebackendcontract&m=' + JSON.stringify({ a: 5, b: 8 }) + '&opts=' + JSON.stringify({ id: this._item.id });
  }
  a.appendChild(document.createTextNode((this._item.orderType) ? this._item.orderType : 'For All'));
  this._gui.oType.appendChild(a);
  
  this._gui.content.appendChild(document.createTextNode((this._item.content.length > 20 ) ? (this._item.content).substring(0, 20) + '......' : this._item.content));
  
  
  
  img = document.createElement('img');
  img.src = 'images/common/delete.png';
  img.style.cursor = 'pointer';
  img.onclick = function() { new RequestUtils()._mwrite('contract', [], [_self._item], function() { _self._options.callbackFunc(); }, null); };
  this._gui.remove.appendChild(img);
};